using System;
using EPiServer.Common;
using EPiServer.Common.Security;
using EPiServer.Community.NewsFeed;

namespace EPiAbstractions.Community.NewsFeed
{
    public interface INewsFeedHandlerFacade
    {
        event EPiServerCommonEventHandler StoryToActorFeedAdded;

        event EPiServerCommonEventHandler StoryToNewsFeedPublished;

        event EPiServerCommonEventHandler StoryToActorFeedRemoved;

        event EPiServerCommonEventHandler ActionAdded;

        event EPiServerCommonEventHandler ActionUpdated;

        event EPiServerCommonEventHandler ActionRemoved;

        NewsFeedStoryCollection GetActorFeed(IUser actor, NewsFeedActionCollection actions, DateTime startDate, DateTime endDate, Int32 page,
                                             Int32 pageSize);

        NewsFeedStoryCollection GetActorFeed(IUser actor, NewsFeedActionCollection actions, DateTime startDate, DateTime endDate, Int32 page,
                                             Int32 pageSize, out Int32 totalItems);

        NewsFeedStoryCollection GetNewsFeed(IUser actor, NewsFeedActionCollection actions, DateTime startDate, DateTime endDate, Int32 page,
                                            Int32 pageSize);

        NewsFeedStoryCollection GetNewsFeed(IUser actor, NewsFeedActionCollection actions, DateTime startDate, DateTime endDate, Int32 page,
                                            Int32 pageSize, out Int32 totalItems);

        NewsFeedStoryCollection GetTargetFeed(IEntity target, NewsFeedActionCollection actions, DateTime startDate, DateTime endDate,
                                              Int32 page, Int32 PageSize);

        NewsFeedStoryCollection GetTargetFeed(IEntity target, NewsFeedActionCollection actions, DateTime startDate, DateTime endDate,
                                              Int32 page, Int32 PageSize, out Int32 totalItems);

        NewsFeedStory AddStoryToActorFeed(NewsFeedStory story);

        NewsFeedStoryActor GetStoryActor(Int32 id);

        NewsFeedAction AddAction(NewsFeedAction action);

        void UpdateAction(NewsFeedAction action);

        void RemoveAction(NewsFeedAction action);

        NewsFeedAction GetAction(Int32 id);

        NewsFeedAction GetAction(String name);

        NewsFeedActionCollection GetActions();

        void RemoveStory(NewsFeedStory story);

        NewsFeedStory GetStory(Int32 id);
    }
}